﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace EFEntity.Migrations
{
    public partial class init2 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "config_file_first_kind",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    first_kind_id = table.Column<string>(nullable: true),
                    first_kind_name = table.Column<string>(nullable: true),
                    first_kind_salary_id = table.Column<string>(nullable: true),
                    first_kind_sale_id = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_config_file_first_kind", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "config_file_second_kind",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    first_kind_id = table.Column<string>(nullable: true),
                    first_kind_name = table.Column<string>(nullable: true),
                    second_kind_id = table.Column<string>(nullable: true),
                    second_kind_name = table.Column<string>(nullable: true),
                    second_salary_id = table.Column<string>(nullable: true),
                    second_sale_id = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_config_file_second_kind", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "config_file_third_kind",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    first_kind_id = table.Column<string>(nullable: true),
                    first_kind_name = table.Column<string>(nullable: true),
                    second_kind_id = table.Column<string>(nullable: true),
                    second_kind_name = table.Column<string>(nullable: true),
                    third_kind_id = table.Column<string>(nullable: true),
                    third_kind_name = table.Column<string>(nullable: true),
                    third_kind_sale_id = table.Column<string>(nullable: true),
                    third_kind_is_retail = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_config_file_third_kind", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Config_major",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Major_kind_id = table.Column<string>(nullable: true),
                    Major_kind_name = table.Column<string>(nullable: true),
                    Major_id = table.Column<string>(nullable: true),
                    Major_name = table.Column<string>(nullable: true),
                    Test_amount = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Config_major", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "config_major_kind",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    major_kind_id = table.Column<string>(nullable: true),
                    major_kind_name = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_config_major_kind", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "config_public_char",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    attribute_kind = table.Column<string>(nullable: true),
                    attribute_name = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_config_public_char", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "salary_standard_details",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    standard_id = table.Column<string>(nullable: true),
                    standard_name = table.Column<string>(nullable: true),
                    item_id = table.Column<int>(nullable: false),
                    item_name = table.Column<string>(nullable: true),
                    salary = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_salary_standard_details", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "config_file_first_kind");

            migrationBuilder.DropTable(
                name: "config_file_second_kind");

            migrationBuilder.DropTable(
                name: "config_file_third_kind");

            migrationBuilder.DropTable(
                name: "Config_major");

            migrationBuilder.DropTable(
                name: "config_major_kind");

            migrationBuilder.DropTable(
                name: "config_public_char");

            migrationBuilder.DropTable(
                name: "salary_standard_details");
        }
    }
}
